using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.Services.TfsAlert.Core
{
    [TestClass]
    public partial class ApplicationHelpers
    {
        string _port = System.Configuration.ConfigurationManager.AppSettings["port"];

        [TestMethod]
        public void AssertGetLocalAddressReturnsCorrectString()
        {
            string expectedValue = "http://" + this.getIpAddress() + ":" + _port + "/TFSAlert";
            string actualValue = this.BuildFullAddress().ToString();

            Assert.AreEqual<string>( expectedValue, actualValue );
        }

        [TestMethod]
        public void AssertGetBaseAddressReturnsCorrectString()
        {
            string expectedValue = "http://" + this.getIpAddress() + ":" + _port + "/";
            string actualValue = this.BuildBaseAddress().ToString();

            Assert.AreEqual<string>( expectedValue, actualValue );
        }
    }
}